<?php
namespace FactoryPattern;

use FactoryPattern\Shape\ShapeFactory;

function test() {
    
    $factory = (new ShapeFactory());
    $circleObj = $factory->getShape('circle');
    $circleObj->draw();

    $rectangleObj = $factory->getShape('rectangle');
    $rectangleObj->draw();

    $squareObj = $factory->getShape('square');
    $squareObj->draw();

}



/*
CircleImpl.php
RectangleImpl.php
ShapeFactory.php
ShapeInterface.php
SquareImpl.php
*/

?>
